home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / TBOX100.ZIP / TOOLBOX.TXT < prev   
Text File  |  1993-11-01  |  2KB  |  38 lines

  1. Visual Basic Toolbox demo with mini title bar
  2.  
  3. This program demos a toolbox with a mini title bar.  The program contains a
  4. main form (an MDI form in this case) and a toolbox.  The toolbox uses
  5. setWindowPos() to make itself a topmost window, and hides itself when the
  6. application loses the focus and shows itself when the application regains
  7. the focus.
  8.  
  9. The toolbox uses a modified version of the smallcap code developed by
  10. Randall Kern and Jim Cash (found as file 3-64.zip on the Microsoft
  11. Developer's Network CD).  The modifications fall into three main areas:
  12.  
  13. 1) Smallcap was not sensitive to on the fly changes in the system colors.
  14.    By moving some code to the paint event I have made this example sensitive
  15.    to any system color changes any time.
  16.  
  17. 2) Normally, clicking on a control box and releasing the mouse button while
  18.    it is still over the control box will bring up the system menu and leave
  19.    it there.  Clicking again on the control box dismissed the menu.  Visual
  20.    Basic's own toolbox and palette box do the former but not the latter
  21.    (clicking on the control box displays the menu bar, but clicking again
  22.    does not dismiss it - it remains visible).  The smallcap example does
  23.    NEITHER - if you click and release on the control box the system menu
  24.    appears and disappears.  This is because it does not use the last
  25.    argument of the TrackPopupMenu() function which lets you specify a
  26.    rectangle which you can click in without the menu disappearing.  I added
  27.    this functionality.  In this example, the system menu behaves like the
  28.    system menu on Visual Basic's toolbox - it appears and stays visible when
  29.    you click on the control box, but is not dismissed when you click on the
  30.    control box again.  I am working on code to do the latter.
  31.  
  32. 3) I added code to the message blasters "Message" sub to check for
  33.    activation/deactivation of the APPLCATION so that the toolbox could
  34.    be shown/hidden as appropriate.
  35.  
  36. Tim Barham
  37. E-Mail: t.barham@qut.edu.au
  38.